package com.young.springdemo.service.expression;

//简单句子节点类
public class SentenceNode extends AbstractExpression {
    private DirectionNode directionNode;
    private ActionNode actionNode;
    private DistanceNode distanceNode;

    public SentenceNode(DirectionNode directionNode, ActionNode actionNode, DistanceNode distanceNode) {
        this.directionNode = directionNode;
        this.actionNode = actionNode;
        this.distanceNode = distanceNode;
    }

    @Override
    public String interrupt() {
        return directionNode.interrupt()+actionNode.interrupt()+distanceNode.interrupt();
    }
}
